﻿<%@ Page Language="C#" MasterPageFile="~/ProductManager/ProductManage.Master" AutoEventWireup="true" CodeFile="AddRecommandedPrdts.aspx.cs" Inherits="ProductManager_AddRecommandedPrdts" Title="无标题页" %>
<%@ MasterType VirtualPath="ProductManage.Master" %> 
<%@ Register Assembly="GoShopping.Components" Namespace="BaseText" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<%--<script type="text/javascript">
function GetAndSetRecPrdtName(btn)
{
    var prdtProName=document.getElementById("ctl00_ContentPlaceHolder1_lblRecPrdt");
    prdtProName.innerHTML=btn.innerHTML;
    event.returnValue=false;
}
</script>--%>
  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <table class="style1" cellpadding="0" cellspacing="0">
                <tr>
                    <td style="width: 100px">
                        商品类型:</td>
                    <td style="width: 200px">
                        <asp:DropDownList ID="ddlType1" runat="server" Width="126px" 
                            AutoPostBack="True" onselectedindexchanged="ddlType1_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                    <td style="width: 200px">
                        &nbsp;</td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        设置商品为<b>推荐商品</b>:</td>
                </tr>
             </table>
            <table class="style1" cellpadding="0" cellspacing="0">
                <tr>
                    <td style="width:400px" valign="top">
                        <asp:GridView ID="extGVRecPrdt" runat="server" 
                            AllowPaging="True" AutoGenerateColumns="False" 
                            PagerText="当前第{0}页,共{1}页{2}条记录" RecordCount="-1" Width="400px" 
                            onpageindexchanging="extGVRecPrdt_PageIndexChanging" 
                            onrowcommand="extGVRecPrdt_RowCommand">
                            <Columns><asp:TemplateField HeaderText="ID" Visible="False"><ItemTemplate><asp:Label ID="lblID" runat="server" Text='<%# Eval("ID") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="商品名称" HeaderStyle-HorizontalAlign="Left"><ItemTemplate><asp:LinkButton ID="lblName" runat="server" Text='<%# Eval("Name") %>' CommandName="PrdtEdit" CommandArgument='<%# Eval("ID") %>' CausesValidation="false"></asp:LinkButton></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="当前价格" HeaderStyle-HorizontalAlign="Left"><ItemTemplate><asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="供应商" HeaderStyle-HorizontalAlign="Left"><ItemTemplate><asp:Label ID="lblSupplyer" runat="server" Text='<%# GetRelatedColumn.GetSupplyerName(Eval("SupplyerID")) %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="操作" HeaderStyle-HorizontalAlign="Center" Visible="false"><ItemTemplate><asp:ImageButton ImageUrl="" runat="server" ID="btnDel" CommandName="PrdtDel" CommandArgument='<%# Eval("ID") %>'/></ItemTemplate><HeaderStyle HorizontalAlign="Center" /><ItemStyle HorizontalAlign="Center" /></asp:TemplateField></Columns><HeaderStyle HorizontalAlign="Left" /></asp:GridView>
                    </td>
                    <td style="width:400px">
                        <div>
                        <input id="hidPrdtId1" type="hidden" runat="server" />
                        <p>推荐商品：<asp:Label ID="lblRecPrdt" runat="server"></asp:Label></p>
                        <input id="hidImgRec" type="hidden" runat="server" />
                        <%--<p style="vertical-align: middle">图片路径：<cc1:ZLTextBox ID="txtRecImg" runat="server"/></p>--%>
                        <p style="vertical-align: middle">推荐理由：<cc1:ZLTextBox ID="txtReason" runat="server" 
                                TextMode="MultiLine" Height="116px" Width="238px"/></p>
                        <p><asp:Button ID="btnAddRecPrdt" runat="server" Text="添加" 
                                onclick="btnAddRecPrdt_Click" style="height: 26px" />                                  
                            </p>
                        </div>
                        </td>
                </tr>
                <tr>
                    <td style="width:400px">
                        </td>
                    <td style="width:400px">
                       </td>
                </tr>
            </table>
            <table class="style1" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        推荐商品列表</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:GridView ID="extGVRecommandedPrdt" runat="server" 
                            AllowPaging="True" AutoGenerateColumns="False" 
                            PagerText="当前第{0}页,共{1}页{2}条记录" RecordCount="-1" Width="800px" 
                            onpageindexchanging="extGVRecommandedPrdt_PageIndexChanging" 
                            onrowcommand="extGVRecommandedPrdt_RowCommand"><Columns><asp:TemplateField HeaderText="商品名称"><ItemTemplate><asp:LinkButton ID="lblName" runat="server" Text='<%# GetPrdtName(Eval("prdctid")) %>' CommandName="PrdtEdit" CommandArgument='<%# Eval("prdctid") %>'></asp:LinkButton></ItemTemplate></asp:TemplateField>
                                <asp:TemplateField HeaderText="图片路径" Visible="False"><ItemTemplate><asp:Label ID="lblImgSrc" runat="server"></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="描述"><ItemTemplate>
                                <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Reason") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="操作" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:ImageButton ImageUrl="" runat="server" ID="btnDel" CommandName="PrdtDel" CommandArgument='<%# Eval("prdctid") %>'/></ItemTemplate><HeaderStyle HorizontalAlign="Center" /><ItemStyle HorizontalAlign="Center" /></asp:TemplateField></Columns><HeaderStyle HorizontalAlign="Left" /></asp:GridView>
                    </td>
                </tr>
            </table>
            </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

